package com.github.tetrisgame.utils;

import android.os.Build;

import com.github.tetrisgame.R;

import java.util.Random;

public class Constants {
    //定义每个小方格的尺寸
    public static final int SIZE = UIUtils.dp2px(30);
    public static final int ROW = 20;
    public static final int COLUMN = 10;
    public static final int OUTSIDECIRCLESIZE = UIUtils.dp2px(40);;
    public static final int INSIDECIRCLESIZE = UIUtils.dp2px(25);;
    private static final String Bmob_API_Key = "9228c1013c65c9c2b68c2cf2e33cee06";


    //获取随机的图片资源
    private static int[] images = {R.drawable.blue,R.drawable.yellow,R.drawable.purple,R.drawable.orange,R.drawable.green};
    public static int getRandomImageResIndex(){
        Random random = new Random();
        int index = 0;
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
            index = random.nextInt(1,images.length+1);
        }
        return index;
    }
    public static int getFixedImageRes(int index){
        return images[index-1];
    }
}
